FROM tomcat:7-jre7

MAINTAINER "gogoyp <gogoyp@gmail.com>"

RUN apt-get update
RUN apt-get install -y maven

ADD main/resources/settings.xml /usr/local/tomcat/conf/
ADD main/resources/tomcat-users.xml /usr/local/tomcat/conf/

ADD main/resources/pom.xml /usr/local/tomcat/

ADD main /usr/local/tomcat

RUN ["mvn","package"]

RUN mv /usr/local/tomcat/target/docktest-1.0.war /usr/local/tomcat/webapps/docktest.war

EXPOSE 8080
